package pattern.decorator;

public class Main {

    public static void main(String[] args) {

        /**
         * 大自行车 200
         * 小自行车 100
         * 防爆胎 100
         * 喇叭 50
         */

        //选个自行车
        Bike bike = new BigBike();

        //搭配了个RSC防爆胎
        bike = new RSCBikeDecorator(bike);
        bike = new RSCBikeDecorator(bike);

        //搭配了一个喇叭
        bike = new SuonaBikeDecorator(bike);
        bike = new SuonaBikeDecorator(bike);

        System.out.println(bike.getDescription()+", 价格："+bike.getPrice());

    }
}
